<template>
	<view class="list u-flex">
		<view class="list-left u-margin-right-30">
			<image src="/static/atlas/GF.png" mode=""></image>
		</view>
		<view class="list-right u-flex u-row-between u-flex-1">
			<view class="title">
				{{item.title}}
			</view>
			<view class="page-look u-flex u-row-between">
				<!-- <view v-if="!isDel" class="page u-flex">
					共12页 
					<span class="col-line"></span>
					446.2KB 
				</view> -->
				<view class="page u-flex">
					<span v-if="!isDel" >下载</span>
					<span v-if="isDel" >上传</span>
					时间：{{$u.timeFormat(item._createtime, 'yyyy-mm-dd')}}
				</view>
				<view v-if="!isDel" class="look u-flex u-col-center u-row-center" @click="goDetail">
					查看
				</view>
				<view v-if="isDel" class="look u-flex u-col-center u-row-center" @click="del">
					删除
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			item:{
				type:Object,
				default:{}
			},
			isDel:{
				type:Boolean,
				default:false
			}
		},
		data(){
			return{
				
			}
		},
		methods:{
			del(){
				this.$emit('del',this.item)
			},
			goDetail(){
				this.$emit('goDetail',this.item)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.list{
		width: 100%;
		height: 195rpx;
		margin: 37rpx 0;
		border-radius: 20rpx;
		padding: 30rpx;
		background-color: #fff;
		box-shadow: 0 0 30rpx rgba(0,0,0,0.2);
		.list-left{
			width: 56rpx;
			height: 58rpx;
			image{
				width: 56rpx;
				height: 58rpx;
			}
		}
		.list-right{
			height: 100%;
			flex-direction: column;
			.title{
				font-size: 30rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp:2;
				-webkit-box-orient: vertical;
				width: 100%;
				line-height: 40rpx;
			}
			.page-look{
				width: 100%;
				.page{
					font-size: 24rpx;
					color: #a6a6a6;
					.col-line{
						display: inline-block;
						width: 1rpx;
						height: 20rpx;
						background-color: #dbdbdb;
						margin: 0 20rpx;
					}
				}
				.look{
					width: 127rpx;
					height: 54rpx;
					border-radius: 54rpx;
					background-color: #feede6;
					font-size: 24rpx;
					color: #c40200;
				}
			}
		}
	}
</style>
